package net.kelissa.jenetic.impl.conceiver;

import java.util.ArrayList;
import java.util.List;

import net.kelissa.jenetic.Conceiver;
import net.kelissa.jenetic.Gene;

public class ConceiverBase implements Conceiver
{

  /**
   * delegate to the Gene conceive method
   */
  @Override
  public List<Gene> conceive(List<Gene> mother, List<Gene> father)
  {
    List<Gene> newGenes = new ArrayList<Gene>();
    for (int i = 0; i < mother.size(); i++)
    {
      Gene conceived = mother.get(i).conceive(father.get(i));
      newGenes.add(conceived);
    }
    return newGenes;
  }

}
